export default [
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/login' },
      { path: '/user/register', component: './User/register' },
      { path: '/user/register/agreement', component: './User/register/Agreement' },
      { path: '/user/resetPassword', component: './User/resetPassword' },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    //Routes: ['src/pages/Authorized'],
    //authority: ['admin', 'user'],
    routes: [
      // 待办事项
      { path: '/', redirect: '/dashboard' },
      // 根据待办类型展示不一样的待办页面
      { path: '/dashboard/todoDetail', hideInMenu: true, component: './Dashboard/TodoDetail'  },

      //个人中心
      { path: '/userCenter', name: 'userCenter', hideInMenu: true, component: './UserCenter' },
      //身份验证
      { path: '/userCenter/authentication', name: 'userCenter-authentication', hideInMenu: true, component: './UserCenter/authentication' },
      //绑定手机号
      { path: '/userCenter/bindPhone', name: 'userCenter-bindPhone', hideInMenu: true, component: './UserCenter/bindPhone' },
      //绑定邮箱
      { path: '/userCenter/bindEmail', name: 'userCenter-bindEmail', hideInMenu: true, component: './UserCenter/bindEmail' },
      //修改手机号
      { path: '/userCenter/editPhone', name: 'userCenter-editPhone', hideInMenu: true, component: './UserCenter/editPhone' },
      //修改邮箱
      { path: '/userCenter/editEmail', name: 'userCenter-editEmail', hideInMenu: true, component: './UserCenter/editEmail' },
      //修改密码
      { path: '/userCenter/editPassword', name: 'userCenter-editPassword', hideInMenu: true, component: './UserCenter/editPassword' },

      //消息
      { path: '/messages', name: 'messages', hideInMenu: true, component: './Messages' },
      //消息详情
      { path: '/messages/detail', name: 'messages-detail', target: '_blank', hideInMenu: true, component: './Messages/detail' },

      //首页
      {
        path: '/dashboard',
        name: 'dashboard',
        icon: 'dashboard',
        component: './Dashboard',
      },
      // 公司管理
      {
        path: '/company',
        name: 'company',
        icon: 'upload',
        component: './Welcome',
        routes: [
          {
            path: '/company/list',
            component: './Welcome',
          },
        ],
      },
      // 项目管理
      {
        path: '/project',
        name: 'project',
        icon: 'upload',
        component: './Welcome',
        routes: [
          {
            path: '/project/list',
            component: './Welcome',
          },
        ],
      },
      // 角色管理
      {
        path: '/role',
        name: 'role',
        icon: 'upload',
        component: './Welcome',
        routes: [
          {
            path: '/role/list',
            component: './Welcome',
          },
        ],
      },
      // 功能权限设置
      {
        path: '/permission',
        name: 'permission',
        icon: 'upload',
        component: './Welcome',
        routes: [
          {
            path: '/permission/list',
            component: './Welcome',
          },
        ],
      },
      // 待办消息模板
      {
        path: '/schedule',
        name: 'schedule',
        icon: 'upload',
        component: './Welcome',
        routes: [
          {
            path: '/schedule/list',
            component: './Welcome',
          },
        ],
      },
      // 其他设置
      {
        path: '/other',
        name: 'other',
        icon: 'upload',
        component: './Welcome',
        routes: [
          {
            path: '/other/list',
            component: './Welcome',
          },
        ],
      },
      // 日志查询
      {
        path: '/log',
        name: 'log',
        icon: 'align-left',
        component: './Welcome',
        routes: [
          {
            path: '/log/information',
            component: './Welcome',
          },
        ],
      },
      // 常见问题
      {
        path: '/qaq',
        name: 'qaq',
        icon: 'align-left',
        component: './Welcome',
        routes: [
          {
            path: '/qaq/information',
            component: './Welcome',
          },
        ],
      },

      {
        // name: 'exception',
        // icon: 'warning',
        path: '/exception',
        routes: [
          // exception
          {
            path: '/exception/403',
            name: 'not-permission',
            component: './Exception/403',
          },
          {
            path: '/exception/404',
            name: 'not-find',
            component: './Exception/404',
          },
          {
            path: '/exception/500',
            name: 'server-error',
            component: './Exception/500',
          },
          {
            path: '/exception/trigger',
            name: 'trigger',
            hideInMenu: true,
            component: './Exception/TriggerException',
          },
        ],
      },
      {
        component: '404',
      },
    ],
  },
]
